# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Notebooks.V1.Model.MigrateRuntimeRequest do
  @moduledoc """
  Request for migrating a Runtime to a Workbench Instance.

  ## Attributes

  *   `network` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the VPC that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same VPC, and this field must be empty. Format: `projects/{project_id}/global/networks/{network_id}`
  *   `postStartupScriptOption` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the behavior of post startup script during migration.
  *   `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. Idempotent request UUID.
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The service account to be included in the Compute Engine instance of the new Workbench Instance when the Runtime uses "single user only" mode for permission. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. When the Runtime uses service account mode for permission, it will reuse the same service account, and this field must be empty.
  *   `subnet` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the subnet that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same subnet, and this field must be empty. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :network => String.t() | nil,
          :postStartupScriptOption => String.t() | nil,
          :requestId => String.t() | nil,
          :serviceAccount => String.t() | nil,
          :subnet => String.t() | nil
        }

  field(:network)
  field(:postStartupScriptOption)
  field(:requestId)
  field(:serviceAccount)
  field(:subnet)
end

defimpl Poison.Decoder, for: GoogleApi.Notebooks.V1.Model.MigrateRuntimeRequest do
  def decode(value, options) do
    GoogleApi.Notebooks.V1.Model.MigrateRuntimeRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Notebooks.V1.Model.MigrateRuntimeRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
